package com.digitalchina.lxnsy.activity.old;

import android.os.Bundle;
import androidx.viewpager.widget.ViewPager;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.adapter.TabViewPagerAdapter;
import com.digitalchina.lxnsy.base.BaseActivity;
import com.digitalchina.lxnsy.entity.PagerItemVO;
import com.digitalchina.lxnsy.fragment.MyConsultFragment;
import com.digitalchina.lxnsy.fragment.MyReplyFragment;
import com.digitalchina.lxnsy.view.MyTabLayout;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：我的咨询
 * 包名：com.digitalchina.bigdata.activity
 * 创建人：郑皓
 * 创建时间：2018/10/12 16:48
 * 修改备注：
 * ================================================
 */
public class MyConsultListActivity extends BaseActivity {

    @Bind(R.id.tab)
    MyTabLayout tab;
    @Bind(R.id.viewpager)
    ViewPager viewpager;

    /*每个 tab 的 item*/
    private List<PagerItemVO> mList = new ArrayList<>();

    @Override
    public void setLayout() {
        setContentLayout(R.layout.activity_my_consult_list);
        setTitle("我的咨询");
    }

    @Override
    public void initMember() {
        mList.add(new PagerItemVO("我的咨询", new MyConsultFragment()));
        mList.add(new PagerItemVO("我的回复", new MyReplyFragment()));

        viewpager.setAdapter(new TabViewPagerAdapter(getFragmentManager(), mList));
        tab.setViewPager(viewpager);
    }

    @Override
    public void addListener() {

    }

    @Override
    public void setHandler() {

    }

    @Override
    public void callBack(Object object) {

    }

    @Override
    public void rightOnClick() {
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
